package com.tianheng.wanzhou.datacollecting.enums;


/**
 * @Author: yujw
 * @Date: 2020/5/15 9:23
 * @Version 1.0
 */
public enum JiangShaEnum {
    MACHIENID(1, "machineId"),
    BACKSLURRYTEMP(2, "backSlurryTemp"),
    BPBTEMP(3, "bPBTemp"),
    BPATEMP(4, "bPATemp"),
    FRONTSLURRYTEMP(5, "frontSlurryTemp"),
    FPBTEMP(6, "fPBTemp"),
    FPATEMP(7, "fPATemp"),
    MERGEUPTEMP(8, "mergeUpTemp"),
    MERGEDOWNTEMP(9, "mergeDownTemp"),
    WSCURRENT(10, "wSCurrent"),
    BYCURRENT(11, "bYCurrent"),
    BUCURRENT(12, "bUCurrent"),
    FYCURRENT(13, "fYCurrent"),
    FUCURRENT(14, "fUCurrent"),
    DRYERCURRENT(15, "dryerCurrent"),
    GRABCURRENT(16, "grabCurrent"),
    WSFANCURRENT(17, "wSFanCurrent"),
    BYFANCURRENT(18, "bYFanCurrent"),
    BUFANCURRENT(19, "bUFanCurrent"),
    FYFANCURRENT(20, "fYFanCurrent"),
    FUFANCURRENT(21, "fUFanCurrent"),
    DRYERFANCURRENT(22, "dryerFanCurrent"),
    GRABFANCURRENT(23, "grabFanCurrent"),
    WSMSTEMP(24, "wSMSTemp"),
    BYMSTEMP(25, "bYMSTemp"),
    BUMSTEMP(26, "bUMSTemp"),
    FYMSTEMP(27, "fYMSTemp"),
    FUMSTEMP(28, "fUMSTemp"),
    DMSTEMP(29, "dMSTemp"),
    GMSTEMP(30, "gMSTemp"),
    WSFCTEMP(31, "wSFCTemp"),
    BYFCTEMP(32, "bYFCTemp"),
    BUFCTEMP(33, "bUFCTemp"),
    FYFCTEMP(34, "fYFCTemp"),
    FUFCTEMP(35, "fUFCTemp"),
    DFCTEMP(36, "dFCTemp"),
    GFCTEMP(37, "gFCTemp"),
    SPEED(38, "speed"),
    REGAIN(39, "regain"),
    DIAMETER(40, "diameter"),
    FUTENSION(41, "fUTension"),
    BUTENSION(42, "bUTension"),
    FMAINFORCE(43, "fMainForce"),
    BMAINFORCE(44, "bMainForce"),
    FRONTUPSLURRY(45, "frontUpSlurry"),
    QYS(46, "qys"),
    BACKUPSLURRY(47, "backUpSlurry"),
    HYS(48, "hys"),
    GQZL(49, "gqzl"),
    WINDINGTENSION(50, "windingTension"),
    UNWINDINGLENGTH(100, "unwindingLength"),
    TYPE(101, "type"),
    BLOCKNUM(102, "blockNum"),
    MONITORNUM(103, "monitorNum"),
    NUMBER(104, "number"),
    AXLENUM(105, "axleNum"),
    SHIFTS(106, "shifts"),
    FIRSTPART(107, "firstPart"),
    SETYARNLENGTH(108, "setYarnLength"),
    ACTUALYARNLENGTH(109, "actualYarnLength"),
    YARNNUM(110, "yarnNum"),
    ELECTRICENERGYMETER(111, "electricEnergyMeter"),
    WATERMETER(112, "waterMeter"),
    STREAMMETER(113, "streamMeter"),
    SETUNWINDINGLENGTH(114, "setUnwindingLength"),
    MACHINETYPE(150, "machineType"),
    ERRCODE(120, "errCode");


    private final Integer code;
    private final String msg;

    JiangShaEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public static String fromCode(Integer code) {
        for (JiangShaEnum jiangShaEnum : JiangShaEnum.values()) {
            if (jiangShaEnum.code.equals(code)) {
                return jiangShaEnum.msg;
            }
        }
        return null;
    }

}
